var bakeButton : GameObject;

private var bakeScript : BakeButton;

function Start (){

	bakeScript = bakeButton.gameObject.GetComponent("BakeButton");
}

function Update () {


	if (StaticVars.mode == 1){
		
		GetComponent(TextMesh).text = bakeScript.piesMade.ToString() + " / 5";
	}
	else if (StaticVars.mode == 2){
		GetComponent(TextMesh).text = bakeScript.piesMade.ToString();
	}
	else {
	//do nothing
	}
}